<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>显示和隐藏内容</title>
</head>

<body>


  <button onclick="clickss()">是否展示横幅</button>

  <button onclick="show()">展示横幅</button>
  <button onclick="closes()">隐藏横幅</button>

  <div id="c-footer-lq">我是内容哦</div>
  <script>
    id = document.getElementById("c-footer-lq");
    //显示横幅
    const show = () => {
      id.style.display = "block";
    };

    //关闭横幅
    const closes = () => {
      id.style.display = "none";
    };

    let switchss = true;
    const clickss = () => {
      switchss = !switchss;
      if (switchss) {
        id.style.display = "block";
        console.log("展示项目");
      } else {
        id.style.display = "none";
        console.log("隐藏项目");
      }
    };
  </script>
</body>

</html>